package com.example.mvvmbase.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.mvvmbase.R;
import com.example.mvvmbase.databinding.FragmentMainBinding;
import com.mobian.mvvm.base.BaseFragment;
import com.mobian.mvvm.base.BaseViewModel;

/**
 * A simple {@link Fragment} subclass.
 */
public class MainFragment extends BaseFragment<FragmentMainBinding, BaseViewModel> {


    private int type;

    public MainFragment(int type) {
        super();
        this.type = type;
    }

    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.fragment_main;
    }

    @Override
    public int initVariableId() {
        return 0;
    }

    @Override
    public void initData() {
        super.initData();

        binding.tvShowPosition.setText("currentPosition is " + type);
    }
}